package model.service;

import model.dao.LoginDAO;
import util.Util;
import vo.LoginVO;

public class LoginService {
	
	private static LoginService instance = new LoginService();
	private LoginDAO dao;
	private LoginService(){
		dao = LoginDAO.getInstance();
	}
	public static LoginService getInstance(){
		if(instance==null) instance = new LoginService();
		return instance;
	}
	
	public LoginVO selectMemberById(String id) throws Exception{
		LoginVO lvo = dao.selectMemberById(id);
		if(lvo!=null){
			lvo.setDate(Util.getDay());
			dao.updateDateById(lvo);
		}
		return lvo;
	}
}
